package lol.clann.minecraft.springboot.api.annotation.condition;

import lol.clann.minecraft.springboot.core.condition.OnMinecraftVersionCondition;
import org.springframework.context.annotation.Conditional;

import java.lang.annotation.*;

/**
 * Conditional扩展,类似{@ConditionalOnProperty} 不过是从被注解的类所属插件的配置文件里读取
 *
 * @author pyz
 * @date 2019/6/1 10:26 AM
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
@Conditional({OnMinecraftVersionCondition.class})
public @interface ConditionalOnMinecraftVersion {
    /**
     * 版本范围,满足一个即可加载
     * @return
     */
    MinecraftVersionRange[] value();

}
